package com.apes.auto.maintain.model;

import com.apes.auto.car.model.*;
import com.apes.framework.jpa.ApesBean;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.scm.masterdata.car.model.CarLevel;
import com.apes.scm.masterdata.car.model.CarType;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

/**
 * @ClassName MaintainPeriod
 * @Description 保养周期总表
 * @Author pengyb
 * @Date 2019/8/8 10:24
 * @Version 1.0
 **/
@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = MaintainPeriod.CONST_TABLE_NAME)
public class MaintainPeriod implements ApesBean {
    public static final String CONST_TABLE_NAME = "byzqb";
    @Id
    @Column(name = "levelID", length = 128)
    @Comment("levelID")
    private String levelID;

    @Column(name = "CXID", length = 32)
    @Comment("车型ID")
    private String CXID;


    @Column(name = "FDJXH", length = 32)
    @Comment("发动机型号")
    private String FDJXH;

    @Column(name = "BZ", length = 200)
    @Comment("备注")
    private String BZ;

    @Column(name = "KT", length = 8)
    @Comment("空调")
    private String KT;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CP", referencedColumnName = "id")
    @Comment("厂牌")
    private VehicleLabel CP;  //根据品牌和厂商

    @NotNull
    @Comment("品牌")
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PP", referencedColumnName = "id")
    private CarBrand PP;

    @NotNull
    @Comment("厂商")
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CS", referencedColumnName = "id")
    private Manufacturers CS;


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "CX", referencedColumnName = "id")
    @Comment("车型")
    private VehicleType CX;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "QCLX", referencedColumnName = "id")
    @Comment("汽车类型")
    private AutoCategory QCLX;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "QCDJ", referencedColumnName = "id")
    @Comment("汽车等级")
    private AutoLevel QCDJ;

//    @Column(name = "CPMC")
//    @Comment("厂牌名称")
//    private String CPMC;  //根据品牌和厂商
//
//    @Column(name = "PP")
//    @Comment("品牌")
//    private String PP;
//
//
//    @Column(name = "CS", length = 64)
//    @Comment("厂商")
//    private String CS;
//
//    @Column(name = "CXMC", length = 64)
//    @Comment("车型名称")
//    private String CXMC;

//    @Column(name = "QCLXMC")
//    @Comment("汽车类型名称")
//    private String QCLXMC;
//
//    @Column(name = "QCDJMC")
//    @Comment("汽车等级名称")
//    private String QCDJMC;


    @Column(name = "XSBB", length = 32)
    @Comment("销售版本")
    private String XSBB;

    @Column(name = "NK", length = 4)
    @Comment("年款")
    private Integer NK;

    @Column(name = "YJFS", length = 16)
    @Comment("引进方式")
    private String YJFS;

    @Column(name = "PL", length = 16)
    @Comment("排量")
    private String PL;

    @Column(name = "RLLX", length = 16)
    @Comment("燃料类型")
    private String RLLX;

    @Column(name = "BSXXH")
    @Comment("变速箱型号")
    private String BSQXH;


    @Column(name = "BSQLX", length = 16)
    @Comment("变速器类型")
    private String BSQLX;


    @Column(name = "BSQMS", length = 200)
    @Comment("变速器描述")
    private String BSQMS;

    @Column(name = "DWSL", length = 22)
    @Comment("挡位数")
    private Integer DWSL;   // 去中文描述 只保留数字 无级归0 [^0-9]

    @Column(name = "XSZDJ", length = 32)
    @Comment("指导价【万元】")
    private String XSZDJ;

    @Column(name = "XBYJYYL", columnDefinition = "number(6,2) default 0")
    @Comment("小保养机油用量(升)")
    private Integer XBYJYYL;

    @Column(name = "XBYJYLC", length = 11)
    @Comment("小保养机油里程（公里）")
    private Integer XBYJYLC;

    @Column(name = "XBYJYSJ", length = 11)
    @Comment("小保养机油时间（个月）")
    private Integer XBYJYSJ;

    @Column(name = "XBYJYJCYLX")
    @Comment("小保养机油基础油类型")
    private String XBYJYJCYLX;

    @Column(name = "XBYJYYPGG")
    @Comment("小保养机油油品规格")
    private String XBYJYYPGG;

    @Column(name = "XBYJYSBLC", length = 11)
    @Comment("小保养机油首保里程（公里）")
    private Integer XBYJYSBLC;

    @Column(name = "XBYJYSBSJ", length = 11)
    @Comment("小保养机油首保时间（个月）")
    private Integer XBYJYSBSJ;

    @Column(name = "XBYJYEBLC", length = 11)
    @Comment("小保养机油二保里程（公里）")
    private Integer XBYJYEBLC;

    @Column(name = "XBYJYEBSJ", length = 11)
    @Comment("小保养机油二保时间（个月）")
    private Integer XBYJYEBSJ;

    @Column(name = "XBYJYLQSBLC", length = 11)
    @Comment("小保养机油滤清首保里程（公里）")
    private Integer XBYJYLQSBLC;

    @Column(name = "XBYJYLQSBSJ", length = 11)
    @Comment("小保养机油滤清首保时间（个月）")
    private Integer XBYJYLQSBSJ;

    @Column(name = "XBYJYLQJGLC", length = 11)
    @Comment("小保养机油滤清间隔里程（公里）")
    private Integer XBYJYLQJGLC;

    @Column(name = "XBYJYLQJGSJ", length = 11)
    @Comment("小保养机油滤清间隔时间（个月）")
    private Integer XBYJYLQJGSJ;

    @Column(name = "KQLQQSBLC", length = 11)
    @Comment("空气滤清器首保里程（公里）")
    private Integer KQLQQSBLC;

    @Column(name = "KQLQQSBSJ", length = 11)
    @Comment("空气滤清器首保时间（个月）")
    private Integer KQLQQSBSJ;

    @Column(name = "KQLQQJGLC", length = 11)
    @Comment("空气滤清器间隔里程（公里）")
    private Integer KQLQQJGLC;

    @Column(name = "KQLQQJGSJ", length = 11)
    @Comment("空气滤清器间隔时间（个月）")
    private Integer KQLQQJGSJ;


    @Column(name = "RYLQQSBLC", length = 11)
    @Comment("燃油滤清器首保里程（公里）")
    private Integer RYLQQSBLC;


    @Column(name = "RYLQQSBSJ", length = 11)
    @Comment("燃油滤清器首保时间（个月）")
    private Integer RYLQQSBSJ;


    @Column(name = "RYLQQJGLC", length = 11)
    @Comment("燃油滤清器间隔里程（公里）")
    private Integer RYLQQJGLC;

    @Column(name = "RYLQQJGSJ", length = 11)
    @Comment("燃油滤清器间隔时间（个月）")
    private Integer RYLQQJGSJ;

    @Column(name = "QBHHSSBLC", length = 11)
    @Comment("全部火花塞首保里程（公里）")
    private Integer QBHHSSBLC;

    @Column(name = "QBHHSSBSJ", length = 11)
    @Comment("全部火花塞首保时间（个月）")
    private Integer QBHHSSBSJ;

    @Column(name = "QBHHSJGLC", length = 11)
    @Comment("全部火花塞间隔里程（公里）")
    private Integer QBHHSJGLC;

    @Column(name = "QBHHSJGSJ", length = 11)
    @Comment("全部火花塞间隔时间（个月）")
    private Integer QBHHSJGSJ;

    @Column(name = "ZLZXYSBLC", length = 11)
    @Comment("助力转向油首保里程（公里）")
    private Integer ZLZXYSBLC;

    @Column(name = "ZLZXYSBSJ", length = 11)
    @Comment("助力转向油首保时间（个月）")
    private Integer ZLZXYSBSJ;

    @Column(name = "ZLZXYJGLC", length = 11)
    @Comment("助力转向油间隔里程（公里）")
    private Integer ZLZXYJGLC;

    @Column(name = "ZLZXYJGSJ", length = 11)
    @Comment("助力转向油间隔时间（个月）")
    private Integer ZLZXYJGSJ;

    @Column(name = "ZCZDYSBLC", length = 11)
    @Comment("整车制动液首保里程（公里）")
    private Integer ZCZDYSBLC;


    @Column(name = "ZCZDYSBSJ", length = 11)
    @Comment("整车制动液首保时间（个月）")
    private Integer ZCZDYSBSJ;

    @Column(name = "ZCZDYJGLC", length = 11)
        @Comment("整车制动液间隔里程（公里）")
    private Integer ZCZDYJGLC;

    @Column(name = "ZCZDYJGSJ", length = 11)
    @Comment("整车制动液间隔时间（个月）")
    private Integer ZCZDYJGSJ;

    @Column(name = "ZDBSXYSBLC", length = 11)
    @Comment("自动变速箱油首保里程（公里）")
    private Integer ZDBSXYSBLC;

    @Column(name = "ZDBSXYSBSJ", length = 11)
    @Comment("自动变速箱油首保时间（个月）")
    private Integer ZDBSXYSBSJ;

    @Column(name = "ZDBSXJGLC", length = 11)
    @Comment("自动变速箱间隔里程（公里）")
    private Integer ZDBSXJGLC;

    @Column(name = "ZDBSXJGSJ", length = 11)
    @Comment("自动变速箱间隔时间（个月）")
    private Integer ZDBSXJGSJ;

    @Column(name = "SDBSXYSBLC", length = 11)
    @Comment("手动变速箱油首保里程（公里）")
    private Integer SDBSXYSBLC;


    @Column(name = "SDBSXYSBSJ", length = 11)
    @Comment("手动变速箱油首保时间（个月）")
    private Integer SDBSXYSBSJ;

    @Column(name = "SDBSXYJGLC", length = 11)
    @Comment("手动变速箱油间隔里程（公里）")
    private Integer SDBSXYJGLC;


    @Column(name = "SDBSXYJGSJ", length = 11)
    @Comment("手动变速箱油间隔时间（个月）")
    private Integer SDBSXYJGSJ;

    @Column(name = "FDJZSPDSBLC", length = 11)
    @Comment("发动机正时皮带/链条首保里程（公里）")
    private Integer FDJZSPDSBLC;

    @Column(name = "FDJZSPDSBSJ", length = 11)
    @Comment("发动机正时皮带/链条首保时间（个月）")
    private Integer FDJZSPDSBSJ;

    @Column(name = "FDJZSPDJGLC", length = 11)
    @Comment("发动机正时皮带/链条间隔里程（公里）")
    private Integer FDJZSPDJGLC;


    @Column(name = "FDJZSPDJGSJ", length = 11)
    @Comment("发动机正时皮带/链条间隔时间（个月）")
    private Integer FDJZSPDJGSJ;


    @Column(name = "KTLQQSBLC", length = 11)
    @Comment("空调滤清器首保里程（公里）")
    private Integer KTLQQSBLC;

    @Column(name = "KTLQQSBSJ", length = 11)
    @Comment("空调滤清器首保时间（个月）")
    private Integer KTLQQSBSJ;

    @Column(name = "KTLQQJGLC", length = 11)
    @Comment("空调滤清器间隔里程（公里）")
    private Integer KTLQQJGLC;

    @Column(name = "KTLQQJGSJ", length = 11)
    @Comment("空调滤清器间隔时间（个月）")
    private Integer KTLQQJGSJ;

    @Column(name = "CSQSBLC", length = 11)
    @Comment("差速器首保里程（公里）")
    private Integer CSQSBLC;


    @Column(name = "CSQSBSJ", length = 11)
    @Comment("差速器首保时间（个月）")
    private Integer CSQSBSJ;

    @Column(name = "CSQJGLC", length = 11)
    @Comment("差速器间隔里程（公里）")
    private Integer CSQJGLC;

    @Column(name = "CSQJGSJ", length = 11)
    @Comment("差速器间隔时间（个月）")
    private Integer CSQJGSJ;

    @Column(name = "LMSBLC", length = 11)
    @Comment("冷媒首保里程（公里)")
    private Integer LMSBLC;

    @Column(name = "LMSBSJ", length = 11)
    @Comment("冷媒首保时间（个月）")
    private Integer LMSBSJ;

    @Column(name = "LMJGLC", length = 11)
    @Comment("冷媒间隔里程（公里）")
    private Integer LMJGLC;

    @Column(name = "LMJGSJ", length = 11)
    @Comment("冷媒间隔时间（个月）")
    private Integer LMJGSJ;

    @Column(name = "KTGLQXSBLC", length = 11)
    @Comment("空调管路清洗首保里程（公里）")
    private Integer KTGLQXSBLC;

    @Column(name = "KTGLQXSBSJ", length = 11)
    @Comment("空调管路清洗首保时间（个月）")
    private Integer KTGLQXSBSJ;

    @Column(name = "KTGLQXJGLC", length = 11)
    @Comment("空调管路清洗间隔里程（公里）")
    private Integer KTGLQXJGLC;

    @Column(name = "KTGLQXJGSJ", length = 11)
    @Comment("空调管路清洗间隔时间（个月）")
    private Integer KTGLQXJGSJ;

    @Column(name = "FDLQYSBLC", length = 11)
    @Comment("防冻冷却液首保里程（公里）")
    private Integer FDLQYSBLC;

    @Column(name = "FDLQYSBSJ", length = 11)
    @Comment("防冻冷却液首保时间（个月）")
    private Integer FDLQYSBSJ;

    @Column(name = "FDLQYJGLC", length = 11)
    @Comment("防冻冷却液间隔里程（公里）")
    private Integer FDLQYJGLC;

    @Column(name = "FDLQYJGSJ", length = 11)
    @Comment("防冻冷却液间隔时间（个月）")
    private Integer FDLQYJGSJ;

    @Column(name = "QSCPSBLC", length = 64)
    @Comment("前刹车片首保里程（公里）")
    private String QSCPSBLC;

    @Column(name = "QSCPSBSJ", length = 64)
    @Comment("前刹车片首保时间（个月）")
    private String QSCPSBSJ;

    @Column(name = "QSCPJGLC", length = 64)
    @Comment("前刹车片间隔里程（公里）")
    private String QSCPJGLC;

    @Column(name = "QSCPJGSJ", length = 64)
    @Comment("前刹车片间隔时间（个月）")
    private String QSCPJGSJ;

    @Column(name = "QSCPANSBLC", length = 64)
    @Comment("前刹车盘首保里程（公里）")
    private String QSCPANSBLC;

    @Column(name = "QSCPANSBSJ", length = 64)
    @Comment("前刹车盘首保时间（个月）")
    private String QSCPANSBSJ;

    @Column(name = "QSCPANJGLC", length = 64)
    @Comment("前刹车盘间隔里程（公里）")
    private String QSCPANJGLC;

    @Column(name = "QSCPANJGSJ", length = 64)
    @Comment("前刹车盘间隔时间（个月）")
    private String QSCPANJGSJ;

    @Column(name = "HSCPTSBLC", length = 64)
    @Comment("后刹车片（蹄）首保里程（公里）")
    private String HSCPTSBLC;

    @Column(name = "HSCPTSBSJ", length = 64)
    @Comment("后刹车片（蹄）首保时间（个月）")
    private String HSCPTSBSJ;

    @Column(name = "HSCPTJGLC", length = 64)
    @Comment("后刹车片（蹄）间隔里程（公里）")
    private String HSCPTJGLC;

    @Column(name = "HSCPTJGSJ", length = 64)
    @Comment("后刹车片（蹄）间隔时间（个月）")
    private String HSCPTJGSJ;

    @Column(name = "HSCPGSBLC", length = 64)
    @Comment("后刹车盘（鼓）首保里程（公里）")
    private String HSCPGSBLC;

    @Column(name = "HSCPGSBSJ", length = 64)
    @Comment("后刹车盘（鼓）首保时间（个月）")
    private String HSCPGSBSJ;

    @Column(name = "HSCPGJGLC", length = 64)
    @Comment("后刹车盘（鼓）间隔里程（公里）")
    private String HSCPGJGLC;

    @Column(name = "HSCPGJGSJ", length = 64)
    @Comment("后刹车盘（鼓）间隔时间（个月）")
    private String HSCPGJGSJ;

    @Column(name = "YGSBLC", length = 11)
    @Comment("雨刮（雨刷）首保 里程（公里）")
    private Integer YGSBLC;

    @Column(name = "YGSBSJ", length = 11)
    @Comment("雨刮（雨刷）首保 时间（个月）")
    private Integer YGSBSJ;

    @Column(name = "YGJGLC", length = 11)
    @Comment("雨刮（雨刷）间隔里程（公里）")
    private Integer YGJGLC;

    @Column(name = "YGJGSJ", length = 11)
    @Comment("雨刮（雨刷）间隔时间（个月）")
    private Integer YGJGSJ;

    @Column(name = "DPSBLC", length = 11)
    @Comment("电瓶首保里程（公里）")
    private Integer DPSBLC;

    @Column(name = "DPSBSJ", length = 11)
    @Comment("电瓶首保时间（个月）")
    private Integer DPSBSJ;

    @Column(name = "DPJGLC", length = 11)
    @Comment("电瓶间隔里程（公里）")
    private Integer DPJGLC;

    @Column(name = "DPJGSJ", length = 11)
    @Comment("电瓶间隔时间（个月）")
    private Integer DPJGSJ;

    @Column(name = "JZQSBLC", length = 11)
    @Comment("减震器首保里程（公里）")
    private Integer JZQSBLC;

    @Column(name = "JZQSBSJ", length = 11)
    @Comment("减震器首保时间（个月）")
    private Integer JZQSBSJ;

    @Column(name = "JZQJGLC", length = 11)
    @Comment("减震器间隔里程（公里）")
    private Integer JZQJGLC;

    @Column(name = "JZQJGSJ", length = 11)
    @Comment("减震器间隔时间（个月）")
    private Integer JZQJGSJ;

    @Column(name = "BSXYDXJZL")
    @Comment("变速箱油大修加注量(升)")
    private String BSXYDXJZL;

    @Column(name = "BSXYBYJZL")
    @Comment("变速箱油保养加注量(升)")
    private String BSXYBYJZL;

    @Column(name = "BSXYGG")
    @Comment("变速箱油规格")
    private String BSXYGG;


    @Column(name = "ZDYJZL")
    @Comment("制动液加注量(升)")
    private String ZDYJZL;

    @Column(name = "ZDYGG")
    @Comment("制动液规格")
    private String ZDYGG;


    @Column(name = "ZXZLYJZL")
    @Comment("转向助力油加注量(升)")
    private String ZXZLYJZL;


    @Column(name = "ZXZLYGG")
    @Comment("转向助力油规格")
    private String ZXZLYGG;

    @Column(name = "LQYJZL")
    @Comment("冷却液加注量(升)")
    private String LQYJZL;

    @Column(name = "LQYGG")
    @Comment("冷却液规格")
    private String LQYGG;

    @Column(name = "xbyjy_hb", length = 50)
    @Comment("xbyjy_hb")
    private String XBYJY;


}
